#if !defined(BRORD_H)
#define BRORD_H
#include <iostream>
#include <vector>
#include <queue>
#include "globaldef.h"

const int ROW = 3;
const int COL = 3;

namespace XCY
{
    struct NetPacket;
}

class Board
{
protected:
    std::vector<char> m_board;
    std::queue<int> m_visited;

    const int MAXCHEER = 7;

    XCY::CheerPoint mPoint;
public:
    Board();
    ~Board();
    //初始化棋盘
    void init();
    //刷新棋盘
    bool updateBoard(const XCY::NetPacket &);
    //清屏
    void cleanBoard();
    //判断胜负
    bool isFinish(char val);
    //删除最早一个
    void deleteone();
    //画棋盘
    void printBoard();
    //设置x，y
    void setPoint(const XCY::CheerPoint &point);
};


#endif // UI
